import java.util.Scanner;

/** 
   This program reads a student's final class average,
   and prints out the appropriate letter grade.
*/
public class DoGrades
{
   public static void main(String[] args)
   {
      
      // Print prompt to enter a final class average 
      System.out.print("Enter final class average: \n");

      // Read in final class average
      Scanner in = new Scanner(System.in);
      double average = in.nextDouble();

      String finalGrade;

      // Determine and print final grade
     
      if(average>90.0 && average<=100.0) finalGrade = "A";
      else if(average>80.0 && average<=90.0) finalGrade = "B";
      else if(average>70.0 && average<=80.0) finalGrade = "C";
      else if(average>=60.0 && average<=70.0) finalGrade = "D";
      else finalGrade = "F";

      System.out.println(finalGrade);
   }
}